display_class->set_selection_owner = _gdk_broadway_display_set_selection_owner;
display_class->send_selection_notify = _gdk_broadway_display_send_selection_notify;
display_class->get_selection_property = _gdk_broadway_display_get_selection_property;
+ display_class->clear_selection_targets = gdk_broadway_display_clear_selection_targets;
+ display_class->add_selection_targets = gdk_broadway_display_add_selection_targets;
display_class->convert_selection = _gdk_broadway_display_convert_selection;
display_class->text_property_to_utf8_list = _gdk_broadway_display_text_property_to_utf8_list;
display_class->utf8_to_string_target = _gdk_broadway_display_utf8_to_string_target;
guchar **data,
GdkAtom *ret_type,
gint *ret_format);
+void gdk_broadway_display_clear_selection_targets (GdkDisplay *display,
+ GdkAtom selection);
+void gdk_broadway_display_add_selection_targets (GdkDisplay *display,
+ GdkWindow *window,
+ GdkAtom selection,
+ GdkAtom *targets,
+ guint ntargets);
void _gdk_broadway_display_send_selection_notify (GdkDisplay *display,
GdkWindow *requestor,
GdkAtom selection,
return 0;
}
+void
+gdk_broadway_display_clear_selection_targets (GdkDisplay *display,
+ GdkAtom selection)
+{
+}
+
+void
+gdk_broadway_display_add_selection_targets (GdkDisplay *display,
+ GdkWindow *window,
+ GdkAtom selection,
+ GdkAtom *targets,
+ guint ntargets)
+{
+}
+
void
_gdk_broadway_display_send_selection_notify (GdkDisplay *display,
GdkWindow *requestor,
guchar **data,
GdkAtom *type,
gint *format);
+ void (*clear_selection_targets)(GdkDisplay *display,
+ GdkAtom selection);
+ void (*add_selection_targets) (GdkDisplay *display,
+ GdkWindow *window,
+ GdkAtom selection,
+ GdkAtom *targets,
+ guint ntargets);
void (*convert_selection) (GdkDisplay *display,
GdkWindow *requestor,
GdkAtom selection,
return GDK_DISPLAY_GET_CLASS (display)->utf8_to_string_target (display, str);
}
+
+void
+gdk_selection_clear_targets (GdkDisplay *display,
+ GdkAtom selection)
+{
+}
+
+void
+gdk_selection_add_targets (GdkWindow *window,
+ GdkAtom selection,
+ GdkAtom *targets,
+ guint n_targets)
+{
+ GdkDisplay *display;
+
+ g_return_if_fail (GDK_IS_WINDOW (window));
+
+ display = gdk_window_get_display (window);
+
+ GDK_DISPLAY_GET_CLASS (display)->add_selection_targets (display, window, selection, targets, n_targets);
+}
GdkAtom property,
guint32 time_);
+GDK_AVAILABLE_IN_3_94
+void gdk_selection_clear_targets (GdkDisplay *display,
+ GdkAtom selection);
+
+GDK_AVAILABLE_IN_3_94
+void gdk_selection_add_targets (GdkWindow *window,
+ GdkAtom selection,
+ GdkAtom *targets,
+ guint n_targets);
+
G_END_DECLS
#endif /* __GDK_SELECTION_H__ */
display_class->get_selection_owner = _gdk_quartz_display_get_selection_owner;
display_class->set_selection_owner = _gdk_quartz_display_set_selection_owner;
display_class->get_selection_property = _gdk_quartz_display_get_selection_property;
+ display_class->clear_selection_targets = gdk_quartz_display_clear_selection_targets;
+ display_class->add_selection_targets = gdk_quartz_display_add_selection_targets;
display_class->convert_selection = _gdk_quartz_display_convert_selection;
display_class->text_property_to_utf8_list = _gdk_quartz_display_text_property_to_utf8_list;
display_class->utf8_to_string_target = _gdk_quartz_display_utf8_to_string_target;
display_class->set_selection_owner = _gdk_wayland_display_set_selection_owner;
display_class->send_selection_notify = _gdk_wayland_display_send_selection_notify;
display_class->get_selection_property = _gdk_wayland_display_get_selection_property;
+ display_class->clear_selection_targets = gdk_wayland_display_clear_selection_targets;
+ display_class->add_selection_targets = gdk_wayland_display_add_selection_targets;
display_class->convert_selection = _gdk_wayland_display_convert_selection;
display_class->text_property_to_utf8_list = _gdk_wayland_display_text_property_to_utf8_list;
display_class->utf8_to_string_target = _gdk_wayland_display_utf8_to_string_target;
guchar **data,
GdkAtom *ret_type,
gint *ret_format);
+void gdk_wayland_display_clear_selection_targets (GdkDisplay *display,
+ GdkAtom selection);
+void gdk_wayland_display_add_selection_targets (GdkDisplay *display,
+ GdkWindow *window,
+ GdkAtom selection,
+ GdkAtom *targets,
+ guint ntargets);
void _gdk_wayland_display_convert_selection (GdkDisplay *display,
GdkWindow *requestor,
GdkAtom selection,
g_signal_emit_by_name (context, "dnd-finished");
gdk_selection_owner_set (NULL, atoms[ATOM_DND], GDK_CURRENT_TIME, TRUE);
- gdk_wayland_selection_clear_targets (display, atoms[ATOM_DND]);
+ gdk_wayland_display_clear_selection_targets (display, atoms[ATOM_DND]);
}
static void
}
void
-gdk_wayland_selection_add_targets (GdkWindow *window,
- GdkAtom selection,
- guint ntargets,
- GdkAtom *targets)
+gdk_wayland_display_add_selection_targets (GdkDisplay *display,
+ GdkWindow *window,
+ GdkAtom selection,
+ GdkAtom *targets,
+ guint ntargets)
{
- GdkDisplay *display = gdk_window_get_display (window);
GdkWaylandSelection *wayland_selection = gdk_wayland_display_get_selection (display);
gpointer data_source;
guint i;
}
void
-gdk_wayland_selection_clear_targets (GdkDisplay *display,
- GdkAtom selection)
+gdk_wayland_display_clear_selection_targets (GdkDisplay *display,
+ GdkAtom selection)
{
GdkWaylandSelection *wayland_selection = gdk_wayland_display_get_selection (display);
#include <gdk/wayland/gdkwaylanddevice.h>
#include <gdk/wayland/gdkwaylanddisplay.h>
#include <gdk/wayland/gdkwaylandmonitor.h>
-#include <gdk/wayland/gdkwaylandselection.h>
#include <gdk/wayland/gdkwaylandwindow.h>
#include <gdk/wayland/gdkwaylandglcontext.h>
+++ /dev/null
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
- * file for a list of people on the GTK+ Team. See the ChangeLog
- * files for a list of changes. These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
- */
-
-#ifndef __GDK_WAYLAND_SELECTION_H__
-#define __GDK_WAYLAND_SELECTION_H__
-
-#if !defined (__GDKWAYLAND_H_INSIDE__) && !defined (GDK_COMPILATION)
-#error "Only <gdk/gdkwayland.h> can be included directly."
-#endif
-
-#include <gdk/gdk.h>
-
-G_BEGIN_DECLS
-
-#if defined (GTK_COMPILATION) || defined (GDK_COMPILATION)
-#define gdk_wayland_selection_add_targets gdk_wayland_selection_add_targets_libgtk_only
-GDK_AVAILABLE_IN_ALL
-void
-gdk_wayland_selection_add_targets (GdkWindow *window,
- GdkAtom selection,
- guint ntargets,
- GdkAtom *targets);
-
-#define gdk_wayland_selection_clear_targets gdk_wayland_selection_clear_targets_libgtk_only
-GDK_AVAILABLE_IN_ALL
-void
-gdk_wayland_selection_clear_targets (GdkDisplay *display, GdkAtom selection);
-
-#endif
-
-G_END_DECLS
-
-#endif /* __GDK_WAYLAND_SELECTION_H__ */
'gdkwaylanddisplay.h',
'gdkwaylandglcontext.h',
'gdkwaylandmonitor.h',
- 'gdkwaylandselection.h',
'gdkwaylandwindow.h'
])
display_class->set_selection_owner = _gdk_win32_display_set_selection_owner;
display_class->send_selection_notify = _gdk_win32_display_send_selection_notify;
display_class->get_selection_property = _gdk_win32_display_get_selection_property;
+ display_class->clear_selection_targets = gdk_win32_display_clear_selection_targets;
+ display_class->add_selection_targets = gdk_win32_display_add_selection_targets;
display_class->convert_selection = _gdk_win32_display_convert_selection;
display_class->text_property_to_utf8_list = _gdk_win32_display_text_property_to_utf8_list;
display_class->utf8_to_string_target = _gdk_win32_display_utf8_to_string_target;
guchar **data,
GdkAtom *ret_type,
gint *ret_format);
+void gdk_win32_display_clear_selection_targets (GdkDisplay *display,
+ GdkAtom selection);
+void gdk_win32_display_add_selection_targets (GdkDisplay *display,
+ GdkWindow *window,
+ GdkAtom selection,
+ GdkAtom *targets,
+ guint ntargets);
void _gdk_win32_display_convert_selection (GdkDisplay *display,
GdkWindow *requestor,
GdkAtom selection,
g_return_if_fail (ctext == NULL);
}
+void
+gdk_win32_display_clear_selection_targets (GdkDisplay *display,
+ GdkAtom selection)
+{
+}
+
/* This function is called from gtk_selection_add_target() and
* gtk_selection_add_targets() in gtkselection.c. It is this function
* that takes care of setting those clipboard formats for which we use
*/
void
-gdk_win32_selection_add_targets (GdkWindow *owner,
- GdkAtom selection,
- gint n_targets,
- GdkAtom *targets)
+gdk_win32_display_add_selection_targets (GdkDisplay *display,
+ GdkWindow *owner,
+ GdkAtom selection,
+ GdkAtom *targets,
+ guint ntargets)
{
HWND hwnd = NULL;
gboolean has_image = FALSE;
GDK_AVAILABLE_IN_ALL
HGDIOBJ gdk_win32_window_get_handle (GdkWindow *window);
-GDK_AVAILABLE_IN_ALL
-void gdk_win32_selection_add_targets (GdkWindow *owner,
- GdkAtom selection,
- gint n_targets,
- GdkAtom *targets);
-
GDK_AVAILABLE_IN_ALL
GdkWindow * gdk_win32_window_foreign_new_for_display (GdkDisplay *display,
HWND anid);
display_class->set_selection_owner = _gdk_x11_display_set_selection_owner;
display_class->send_selection_notify = _gdk_x11_display_send_selection_notify;
display_class->get_selection_property = _gdk_x11_display_get_selection_property;
+ display_class->clear_selection_targets = gdk_x11_display_clear_selection_targets;
+ display_class->add_selection_targets = gdk_x11_display_add_selection_targets;
display_class->convert_selection = _gdk_x11_display_convert_selection;
display_class->text_property_to_utf8_list = _gdk_x11_display_text_property_to_utf8_list;
display_class->utf8_to_string_target = _gdk_x11_display_utf8_to_string_target;
guchar **data,
GdkAtom *ret_type,
gint *ret_format);
+void gdk_x11_display_clear_selection_targets (GdkDisplay *display,
+ GdkAtom selection);
+void gdk_x11_display_add_selection_targets (GdkDisplay *display,
+ GdkWindow *window,
+ GdkAtom selection,
+ GdkAtom *targets,
+ guint ntargets);
void _gdk_x11_display_convert_selection (GdkDisplay *display,
GdkWindow *requestor,
GdkAtom selection,
return 0;
}
+void
+gdk_x11_display_clear_selection_targets (GdkDisplay *display,
+ GdkAtom selection)
+{
+}
+
+void
+gdk_x11_display_add_selection_targets (GdkDisplay *display,
+ GdkWindow *window,
+ GdkAtom selection,
+ GdkAtom *targets,
+ guint ntargets)
+{
+}
+
void
_gdk_x11_display_send_selection_notify (GdkDisplay *display,
GdkWindow *requestor,
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (selection != GDK_NONE);
-#ifdef GDK_WINDOWING_WAYLAND
- if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (widget)))
- gdk_wayland_selection_clear_targets (gtk_widget_get_display (widget), selection);
-#endif
+ gdk_selection_clear_targets (gtk_widget_get_display (widget), selection);
lists = g_object_get_data (G_OBJECT (widget), gtk_selection_handler_key);
list = gtk_selection_target_list_get (widget, selection);
gtk_target_list_add (list, target, 0, info);
-#ifdef GDK_WINDOWING_WAYLAND
- if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (widget)))
- gdk_wayland_selection_add_targets (gtk_widget_get_window (widget), selection, 1, &target);
-#endif
-#ifdef GDK_WINDOWING_WIN32
- gdk_win32_selection_add_targets (gtk_widget_get_window (widget), selection, 1, &target);
-#endif
+ gdk_selection_add_targets (gtk_widget_get_window (widget), selection, &target, 1);
}
/**
guint ntargets)
{
GtkTargetList *list;
+ GdkAtom *atoms = g_new (GdkAtom, ntargets);
+ guint i;
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (selection != GDK_NONE);
list = gtk_selection_target_list_get (widget, selection);
gtk_target_list_add_table (list, targets, ntargets);
-#ifdef GDK_WINDOWING_WAYLAND
- if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (widget)))
- {
- GdkAtom *atoms = g_new (GdkAtom, ntargets);
- guint i;
+ for (i = 0; i < ntargets; i++)
+ atoms[i] = gdk_atom_intern (targets[i].target, FALSE);
- for (i = 0; i < ntargets; i++)
- atoms[i] = gdk_atom_intern (targets[i].target, FALSE);
-
- gdk_wayland_selection_add_targets (gtk_widget_get_window (widget), selection, ntargets, atoms);
- g_free (atoms);
- }
-#endif
-
-#ifdef GDK_WINDOWING_WIN32
- {
- int i;
- GdkAtom *atoms = g_new (GdkAtom, ntargets);
-
- for (i = 0; i < ntargets; ++i)
- atoms[i] = gdk_atom_intern (targets[i].target, FALSE);
- gdk_win32_selection_add_targets (gtk_widget_get_window (widget), selection, ntargets, atoms);
- g_free (atoms);
- }
-#endif
+ gdk_selection_add_targets (gtk_widget_get_window (widget), selection, atoms, ntargets);
+ g_free (atoms);
}